package cn.zysoft.his4killsession.factory;

/**
 * 获得和设置上下文环境 主要负责改变上下文数据源的名称
 * 
 * @author XIAOXING
 * 
 */
public class DataSourceContextHolder {
	//线程本地环境
	private static final ThreadLocal contextHolder = new ThreadLocal();

	// 设置数据源类型
	public static void setDataSourceType(String dataSourceType) {
		contextHolder.set(dataSourceType);
	}

	public static String getDataSouceType() {
		return (String) contextHolder.get();
	}

	public static void clearDataSouceType() {
		contextHolder.remove();
	}

}
